package com.hh.service.dao.im;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hh.common.model.im.ImGroupOwnerAccount;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ImGroupOwnerAccountDao extends BaseMapper<ImGroupOwnerAccount> {
    @Select("select * from eb_im_group_owner_account where is_full = 0 limit 1")
    ImGroupOwnerAccount getOneGroupOwner();

    @Update("update eb_im_group_owner_account set is_full = 1 where account = #{groupOwnerId}")
    void updateFullStatus(@Param("groupOwnerId") String groupOwnerId);
}
